Storage system and data management method

ABSTRACT

A storage system is provided with a plurality of physical storage devices, a cache memory, a control device that is coupled to the plurality of physical storage devices and the cache memory, and a buffer part. The buffer part is a storage region that is formed by using at least a part of a storage region of the plurality of physical storage devices and that is configured to temporarily store at least one target data element that is to be transmitted to a predetermined target. The control device stores a target data element into a cache region that has been allocated to a buffer region (that is a part of the cache memory and that is a storage region of a write destination of the target data element for the buffer part). The control device transmits the target data element from the cache memory. In the case in which a new target data element is generated, the control device executes a control in such a manner that the new target data element has a high tendency to be stored for a buffer region in which the transmitted target data element has been stored and to which a cache region has been allocated.

TECHNICAL FIELD

The present invention relates to a technique for storing data on atemporary basis into a storage region based on at least a part of aphysical storage device.

BACKGROUND ART

A storage system can be provided with a plurality of logical volumes(hereafter referred to as a volume) as a plurality of logical storagedevices based on a plurality of nonvolatile physical storage devices(such as an HDD (Hard Disk Drive)). There is a volume that is used as abuffer volume in the plurality of volumes. The buffer volume is a volumethat is used as a temporary storage region like a buffer in which datais stored on a temporary basis (see Patent Literature 1 for instance).

A storage system is provided with a cache memory (for instance, avolatile memory) in addition to a physical storage device in general.The storage system receives a write request that specifies a volume froma host computer for instance, stores data (write data) of a write targetthat conforms to the write request, and returns a response to the host.Hereafter a volume that can be specified by an I/O request (a writerequest or a read request) from a host computer is referred to as anormal volume in order to distinguish the volume from a buffer volume.The storage system stores write data into a physical storage device thatis a basis of a normal volume from a cache memory after responding tothe host. A response can be returned to a host after the write data isstored into a normal volume (a physical storage device that is a basisof a normal volume) from a cache memory.

A storage system can also store data that is written to a buffer volumeinto a cache memory and then store the data from a cache memory to abuffer volume (a physical storage device that is a basis of a buffervolume) at an arbitrary timing in the case in which data is stored intonot only a normal volume but also a buffer volume.

There is a journal volume as a buffer volume for instance. A remote copyis to copy a duplicate of a copy source volume (a primary volume) of aprimary storage system to a copy destination volume (a secondary volume)of a secondary storage system. For the remote copy, the data of a copysource volume is stored into a journal volume as a journal. A journalvolume is used in such a manner that a journal that is corresponded to awrite to a primary volume is stored into a leading region at first andother regions in order of precedence for instance. After a journal isstored into a trailing region of a journal volume, the journal volume isused in such a manner a journal is stored into a leading region at firstand other regions again.

CITATION LIST Patent Literature [PTL 1]

-   U.S. Patent Application Laid-Open Publication No. 2007/0079088

SUMMARY OF INVENTION Technical Problem

In order to store data that is stored into a volume into a cache memory,a cache region (a part of a cache memory) is allocated for a volumeregion (a part of a volume) that is a write destination of data. Theallocation of a cache region is executed by a control device (aprocessor in a quintessential way) that is included in a storage system.

In the case in which a cache region is newly allocated for a volumeregion of a write destination every when data is stored into a volume, acache region is newly allocated for a volume region of a storedestination of a journal every when a journal is stored into a journalvolume. Consequently, a load is applied to a control device.

Moreover, a cache memory is limited, it is necessary that a cache regionthat has been allocated and in which a transmitted journal has beenstored is released appropriately in order to newly allocate a cacheregion. This is one of causes of a load to a control device.

Solution of Problem

A storage system is provided with a plurality of physical storagedevices, a cache memory, a control device that is coupled to theplurality of physical storage devices and the cache memory, and a bufferpart. The buffer part is a storage region that is formed by using atleast a part of a storage region of the plurality of physical storagedevices and that is configured to temporarily store at least one targetdata element that is to be transmitted to a predetermined target. Thecontrol device executes the following processing (A) to (C):

(A) The control device stores a target data element into a cache regionthat is a part of the cache memory and that has been allocated to abuffer region that is a storage region of a write destination of thetarget data element for the buffer part.

(B) The control device transmits the target data element from the cachememory.

(C) In the case in which a new target data element is generated, thecontrol device executes a control in such a manner that the new targetdata element has a high tendency to be stored for a buffer region inwhich the transmitted target data element has been stored and to which acache region has been allocated.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a view illustrating a management method of a journal for ajournal volume in accordance with a conventional example.

FIG. 2 is a view showing an example of the management information formanaging a journal for a journal volume in accordance with aconventional example.

FIG. 3 is a view illustrating a first problem in accordance with aconventional example.

FIG. 4 is a view illustrating a second problem in accordance with aconventional example.

FIG. 5 is a view illustrating a first solving method for solving aproblem.

FIG. 6 is a view illustrating a state of a cache part for a firstsolving method for solving a problem.

FIG. 7 is a view illustrating a second solving method for solving aproblem.

FIG. 8 is a view illustrating a state of a cache part for a secondsolving method for solving a problem.

FIG. 9 is a view illustrating a summary of an embodiment 1.

FIG. 10 is a view illustrating a state of a journal volume in accordancewith the embodiment 1.

FIG. 11 is a total block diagram showing a computer system in accordancewith the embodiment 1.

FIG. 12 is a partial block diagram showing a computer systemconcentrating on the storage system in accordance with the embodiment 1.

FIG. 13 is a view illustrating a copy of a volume and a journal volumein accordance with the embodiment 1.

FIG. 14 is a view illustrating a summary of an operation in a data writein accordance with the embodiment 1.

FIG. 15 is a detailed block diagram showing a memory package inaccordance with the embodiment 1.

FIG. 16 is a view showing an example of the sequence number informationin accordance with the embodiment 1.

FIG. 17 is a view showing an example of a block management bitmap inaccordance with the embodiment 1.

FIG. 18 is a view showing an example of the current block information inaccordance with the embodiment 1.

FIG. 19 is a view showing an example of the current address informationin accordance with the embodiment 1.

FIG. 20 is a view illustrating a block management bitmap, a currentblock, and a current address in accordance with the embodiment 1.

FIG. 21 is a view showing an example of the in-block maximum sequencenumber information in accordance with the embodiment 1.

FIG. 22 is a flowchart of a processing in a write in accordance with theembodiment 1.

FIG. 23 is a flowchart of a JNL data storage address decision processingin accordance with the embodiment 1.

FIG. 24 is a flowchart of a block release processing in accordance withthe embodiment 1.

FIG. 25 is a flowchart of a JNL read processing in accordance with theembodiment 1.

FIG. 26 is a flowchart of a restore processing in accordance with theembodiment 1.

FIG. 27 is a detailed view showing a control information part inaccordance with the embodiment 2.

FIG. 28 is a detailed view showing a program part in accordance with theembodiment 2.

FIG. 29 is a view showing an example of the JNCB block managementinformation in accordance with the embodiment 2.

FIG. 30 is a view showing an example of the JNCB current write blockinformation in accordance with the embodiment 2.

FIG. 31 is a view showing an example of the JNCB current read blockinformation in accordance with the embodiment 2.

FIG. 32 is a view showing an example of the JNCB current write addressinformation in accordance with the embodiment 2.

FIG. 33 is a view showing an example of the JNCB current read addressinformation in accordance with the embodiment 2.

FIG. 34 is a view illustrating a block and an address in accordance withthe embodiment 2.

FIG. 35 is a flowchart of a JNCB storage address decision processing inaccordance with the embodiment 2.

FIG. 36 is a flowchart of a JNL read processing in accordance with theembodiment 2.

FIG. 37 is a flowchart of a restore processing in accordance with theembodiment 2.

FIG. 38 is a view illustrating a summary of an embodiment 3.

FIG. 39 is a detailed view showing a control information part inaccordance with the embodiment 3.

FIG. 40 is a flowchart of a JNL data storage address decision processingin accordance with the embodiment 3.

FIG. 41 is a view illustrating a modified example in accordance with theembodiment 3.

FIG. 42 is a view illustrating a virtual volume in accordance with theembodiment 4.

FIG. 43 is a view showing an example of a pool table in accordance withthe embodiment 4.

FIG. 44 is a view showing an example of a virtual volume managementtable in accordance with the embodiment 4.

FIG. 45 is a flowchart of a block release processing in accordance withthe embodiment 4.

FIG. 46 is a flowchart of a page release processing in accordance withthe embodiment 4.

FIG. 47 is a view showing an example of a correspondence relationshipbetween a block and a page in accordance with the embodiment 4.

FIG. 48 is a flowchart of a page release processing in accordance with amodified example of the embodiment 4.

FIG. 49 is a first view illustrating an expansion of a journal volume inaccordance with the embodiment 4.

FIG. 50 is a second view illustrating an expansion of a journal volumein accordance with the embodiment 4.

FIG. 51 is a view illustrating a summary of an embodiment 5.

FIG. 52 is a detailed view showing a control information part inaccordance with the embodiment 5.

FIG. 53 is a flowchart of a JNL data storage address decision processingin accordance with the embodiment 5.

FIG. 54 is a flowchart of a JNL read processing in accordance with theembodiment 5.

FIG. 55 is a flowchart of a restore processing in accordance with theembodiment 5.

DESCRIPTION OF EMBODIMENTS

Some embodiments will be described with reference to drawings in thefollowing. Any embodiments that will be described in the following donot restrict the invention in accordance with the claims, and all ofelements and all of pairs of the elements that will be described in theembodiments are not necessarily essential for the means for solving theproblems of the invention.

In the following descriptions, while the information will be describedin the expression of “aaa table” in some cases, the information can berepresented by other than a data structure such as a table. In order toindicate that the information is not depended on a data structure, theinformation of “aaa table” or the like can also be referred to as “aaainformation”.

In the following descriptions, the processing will be described while a“program” is handled as a subject in some cases. In the case in whichthe program is executed by a processor, the predetermined processing isexecuted. Consequently, a subject of a processing can also be aprocessor. The processing that is disclosed while a program is handledas a subject can also be a processing that is executed by a processorthat executes the program or an apparatus that is provided with theprocessor (for instance, a control device, a controller, and a storagesystem). Moreover, apart or a whole of a processing that is executedwhen the processor executes a program can also be executed by a hardwarecircuit as substitute for or in addition to a processor. A wide varietyof programs can be installed to each of the computers by a programdistribution server or a storage medium that can be read by a computer.

Embodiment 1

In the first place, a problem of a conventional example and a summary ofan embodiment 1 will be described in the following.

FIG. 1 is a view illustrating a management method of a journal for ajournal volume in accordance with a conventional example.

For a management method of a journal in accordance with a conventionalexample, a JVOL (Journal Volume) 252 that is used as a buffer region forstoring a JNL (Journal) on a temporary basis is used by a wraparoundmethod for a primary storage system 200A. In other words, a JNL that hasbeen generated is stored from a leading head address of the JVOL 252 inorder of precedence. After a JNL is stored up to the last address, a JNLis stored from a leading head address again. On the other hand, a JNL ofa leading head address of the JVOL 252 is taken in order of precedenceand is transmitted to a secondary storage system 200B.

FIG. 2 is a view showing an example of the management information formanaging a journal for a journal volume in accordance with aconventional example.

The management information 1000 is managed in order to achieve a journalmanagement method that is shown in FIG. 1. The management information1000 stores a record that is provided with the fields of a type 1000 a,a JL number (#) 1000 b, and an address 1000 c.

The type 1000 a stores a type of an address. In this example, a leadinghead address that indicates an address of a leading head of a freeregion that is to store a JNL and an end address that indicates anaddress of an end in which a transmitted JNL has been stored. The JLnumber (#) 1000 b stores a volume number of a JVOL. The address 1000 cstores a corresponded address. The volume number is a number foruniquely identifying a volume in the storage system 200.

In the journal management method, a region in which a JNL that has notbeen transmitted to a secondary storage system 200B has been stored ismanaged in such a manner that the region is not overwritten by using aleading head address and an end address.

FIG. 3 is a view illustrating a first problem in accordance with aconventional example. In the figure, the rectangles in a volume 252 anda cache part 223 indicate a region in which a JNL is stored. A region inwhich a JNL has been stored as a practical matter is shown by solidlines and a region in which a JNL has not been stored as a practicalmatter is shown by dashed lines.

As shown in a state 1 of FIG. 3, in the case in which a JNL that isstored at a leading head of a JVOL 252 is generated, a JNL is not storedinto a region of an address to which the JVOL 252 is corresponded, andthe JNL is stored into a region of the cache part 223 that has beenallocated to the corresponded address.

In the case in which a predetermined time has elapsed after a JNL isstored into the cache part 223, data of the cache part 223 is storedinto the JVOL 252 as shown in a state 2 of FIG. 3. In other words, thedata of the cache part 223 is destaged.

There is a possibility that a JNL that has been destaged has beentransmitted to the secondary storage system 200B. A JNL that has beentransmitted to the secondary storage system 200B is data that is notrequired to be stored into the JVOL 252. In the case in which aprocessing of destage is executed for such data, a processor resourceand a resource of an HDD 240 that are related to the processing ofdestage go to waste, whereby the utilization efficiency is reducedunfortunately (a first problem).

FIG. 4 is a view illustrating a second problem in accordance with aconventional example.

As shown in a state 1 of FIG. 4, in the case in which a new JNL isgenerated in a sequential manner, a region of the JVOL 252 is allocatedto all regions of the cache part 223.

In the case in which a new JNL is further generated after that, as shownin a state 2 of FIG. 4, a region of the cache part 223 is released, theregion is allocated to a new region of the JVOL 252, and a JNL is storedinto the region. In the case in which a JNL that has been stored into aregion that is released for the cache part 223 is dirty data (data thathas not been destaged to the JVOL 252) in this case, the region isreleased and used after a JNL is destaged to the JVOL 252. On the otherhand, in the case in which a JNL that has been stored into a region thatis released for the cache part 223 is clean data, the region is releasedand used in a timely fashion. In the case in which the data on the cachepart 223 is equivalent to the data that has been stored into the HDD240, the data on the cache part 223 is clean data. Moreover, the datathat is on the cache part 223 and that has not yet been written to theHDD 240 is dirty data.

In this case, a processing of a release of a region of the cache part223 and a processing of an allocation of a region of the cache part 223to a new region of the JVOL 252 are executed. Consequently, a processorresource that executes the processing has a load, whereby theutilization efficiency of a processor resource is reduced unfortunately(a second problem).

FIG. 5 is a view illustrating a first solving method for solving aproblem. FIG. 6 is a view illustrating a state of a cache part for afirst solving method for solving a problem.

For the first solving method as shown in FIG. 5, a processor 211releases a region of the cache part 223 that has been allocated to aregion of the JVOL 252 in which a JNL that has been transmitted to thesecondary storage system 200B, that is, a transmitted JNL is stored forinstance. The region of the JVOL 252 in which a transmitted JNL has beenstored can be identified by a leading head address and an end address ofthe management information 1000. Moreover, a region of the cache part223 that has stored the data can be identified based on the allocationrelationship between a region of the JVOL 252 and a region of the cachepart 223.

In accordance with this solving method, as shown in the state 1 of FIG.6, in the case in which a region of the cache part 223 is allocated to aregion of the JVOL 252, a region of the cache part 223 that has beenallocated to a region of the JVOL 252 that stores a JNL that has beentransmitted is released to be in the state 2. As described above, sincea JNL that has been transmitted does not exist in a region of the cachepart 223, the destage for the JNL is not executed, a useless load to aprocessor resource and an HDD resource can be reduced.

FIG. 7 is a view illustrating a second solving method for solving aproblem. FIG. 8 is a view illustrating a state of a cache part for asecond solving method for solving a problem.

For the second solving method, in the case in which a circuitdisturbance or the like does not occur, a JNL is generated and storedinto the JVOL 252 (or the cache part 223), and the JNL that has beenstored into the JVOL 252 (or the cache part 223) is transmitted to thesecondary storage system 200B. Consequently, the second solving methodis implemented by focusing attention on that a JNL remains only in acapacity that is sufficiently smaller than the total capacity of theJVOL 252.

In other words, for the first solving method as shown in FIG. 7, a freeregion of the next address is not used in a sequential manner as aregion of the JVOL 252 that stores a JNL, but a region that is used forthe JVOL 252 is a comparatively small capacity in such a manner that aregion that has been transmitted is sued. Since the region is acomparatively small capacity as described above, there is a highpossibility that a region of the cache part 223 is allocated to a regionof the JVOL 252.

In accordance with this solving method, as shown in the state 1 of FIG.8, in the case in which a region of the cache part 223 is allocated to aregion of the JVOL 252, a JNL that has been newly generated is storedinto a region in which a transmitted JNL of the JVOL 252 is stored, andthe JNL can be stored into the cache part 223 without executing aprocessing for newly allocating a region of the cache part 223 to theregion. As described above, it is not necessary to execute a processingfor allocating a region of the cache part 223 to the JVOL 252.Consequently, a load to a processor resource can be reduced. Since apossibility of that a JNL that has been transmitted remains in the cachepart 223 can be reduced by this solving method, an occurrence of destagecan be reduced and the first problem can also be solved.

FIG. 9 is a view illustrating a summary of an embodiment 1. FIG. 10 is aview illustrating a state of a journal volume in accordance with theembodiment 1.

In the embodiment 1 as shown in FIG. 9, a free region of the nextaddress is not used in a sequential manner as a region of the JVOL 252that stores a JNL, and a region that has been transmitted is used tomake a region that is used for the JVOL 252 to be a comparatively smallcapacity. As described above, a region that is used for the JVOL 252 canbe made a comparatively small capacity in which a JNL that has beentransmitted has been stored. Consequently, there is a high possibilitythat a region of the cache part 223 is allocated to a region of the JVOL252, and there is a high possibility that it is not necessary that anallocation of a region of the cache part 223 is executed.

In a state shown in FIG. 9 for instance, in the case in which a JNL isstored into a region that has been transmitted and a circuit disturbanceoccurs for instance, a leading head address that indicates a region inwhich a JNL is stored catches up with an end address, and there is noregion that stores a JNL. Consequently, in the embodiment 1, a region ofthe JVOL 252 can be used in an appropriate manner even in such a case.

In the present embodiment, as shown in a state 1 of FIG. 10, a fixedcapacity is allocated to a JNCB region 2524 in which a JNCB 2523 isstored, and the JNL data 2524 in a JNL is managed by using a pluralityof blocks BK of a predetermined size (a fixed size in this embodiment).The JNCB 2523 is the control data for managing an storage address forthe JVOL 252 of the JNL data. At least one JNL data 2524 can be storedinto the block BK. In the figure, a JNCB 2523 is indicated by arectangle, a sequence number that is corresponded to the JNCB isindicated in the rectangle, the JNL data 2524 is shown in a circularform, and a sequence number that is corresponded to JNL data 2524 isindicated in a circular form. A block BK is indicated by a dashedrectangle and a block number (for instance, (1)) is indicated in arectangle. In other similar figures, a similar description is executed.

In a first place, as shown in a state 1, the JNL data 2524 that has beengenerated is stored to a leading head block (a block number 1) in orderof precedence from a leading head. In the case in which there is nospace to which the JNL data 2524 is written in the leading head blockBK, a free block BK (a block of a block number 2 in the figure) issearched and the JNL data 2524 is written to the block BK as shown in astate 2 of FIG. 10.

On the other hand, in the case in which all of the JNL data 2524 in theblock BK is transmitted to the secondary storage system 200B, the blockBK (a block of a block number 1 in the figure) is made to be a freeblock as shown in a state 3 of FIG. 10.

In the case in which the JNL data 2524 is generated and a free block issearched after that, a block that is not the next block BK (a block of ablock number 3) but a block BK that has been used and that becomes afree block recently (a block of a block number 1) is a block BK of astored destination of the JNL data 2524, and the JNL data 2524 is storedas shown in a state 4 of FIG. 10. Since there is a high possibility thata region of the cache part 223 has been allocated to a block thatbecomes a free block recently, there is a high possibility that aprocessing for allocating a region of the cache part 223 to the block BKis not necessary when the JNL data 2524 is stored into the block BK.Consequently, there is a high possibility that the JNL data 2524 isstored into a storage region to which a region of the cache part 223 hasbeen allocated. Therefore, a load to a processor can be reduced and theutilization efficiency of a processor can be improved.

In the next place, a computer system in accordance with the embodiment 1will be described in detail.

FIG. 11 is a total block diagram showing a computer system in accordancewith the embodiment 1.

A computer system 10 is provided with a primary host computer (a primaryhost) 100A, a primary storage system 200A, a secondary storage system200B, and a secondary host computer (a secondary host) 100B. The primarystorage system 200A is a storage system that is on a primary side (acopy source) to one volume, and can be a storage system that is on asecondary side (a copy destination) to other volume in some cases.Similarly, the secondary storage system 200B is a storage system that ison a secondary side to one volume, and can be a storage system that ison a primary side to other volume in some cases.

The primary host 100A and the primary storage system 200A are coupled toeach other via a network. The primary storage system 200A and thesecondary storage system 200B are coupled to each other via a network.The secondary storage system 200B and the secondary host 100B arecoupled to each other via a network. It is not always necessary that thesecondary host 100B is installed in advance. The secondary host 100B canbe installed by no later than when a business processing is executedusing the secondary storage system 200B.

The primary host 100A is provided with a memory 101, a CPU (CentralProcessing Unit) 102, and an interface (I/F) 103. The memory 101 storesan application (such as a data base application) 104 that is softwarethat is configured to execute a business processing. The application 104stores the data that is used for a business processing into the primarystorage system 200A.

The secondary storage system 200B is used for storing a copy of datathat has been stored into the primary storage system 200A for a disasterrecovery for instance.

The secondary host 100B is a host that is configured to execute abusiness processing by using data of the secondary storage system 200Bin the case in which a failure occurs for the primary host 100A or theprimary storage system 200A. The secondary host 100B is provided with amemory 101, a CPU (Central Processing Unit) 102, and an interface (I/F)103. The memory 101 stores an application 104 that is software that isconfigured to execute a business processing. The application 104 storesthe data that is used for a business processing into the secondarystorage system 200B.

FIG. 12 is a partial block diagram showing a computer systemconcentrating on the storage system in accordance with the embodiment 1.

The storage system 200 (200A, 200B) is provided with at least onemicroprocessor package (MPPK) 210, a memory package 220, a back endpackage (BE package) 230, and a front end package (FE package) 260. TheMPPK 210, a memory package 220, a BE package 230, and a FE package 260are coupled to each other via an internal bus 280.

The FE package 260 is provided with a port 261 and a memory 262. Theport 261 is coupled to the host 100 (100A, 100B) via a network 110, andmediates a communication with the host 100. The memory 262 stores a widevariety of data that is necessary for a processing of the FE package260. The memory 262 is used for storing data that has been transmittedfrom the primary host 100A and data that is transmitted to the primaryhost 100A on a temporary basis.

The memory package 220 is configured by at least one memory device forinstance, and is provided with a control information part 221 that isconfigured to store the control information, a program part 222 that isconfigured to store a program, and a cache part 223 as an example of acache memory that is configured to cache data for instance. A capacityof the cache part 223 is smaller than that of a volume 250 in general.

The MPPK 210 is provided with a processor 211, a local memory 212, and amaintenance port 213. The processor 211, the local memory 212, and themaintenance port 213 are coupled to each other via an internal bus 214.The local memory 212 stores a wide variety of data that is necessary forthe MPPK 210. The maintenance port 213 mediates a communication with amaintenance terminal 270. The processor 211 executes a wide variety ofprocessing. The processor 211 executes a wide variety of processing byexecuting a wide variety of programs that have been stored into aprogram part 222 of the memory package 220. Moreover, the processor 211executes a wide variety of processing by using a wide variety ofinformation that has been stored into the control information part 221of the memory package 220.

The BE package 230 is provided with a port 231 and a memory 232. Theport 231 is coupled to at least one HDD 240 as an example of a physicalstorage device via a bus 283. A volume 250 that is configured to managedata is configured by at least one storage region of the HDD 240 forinstance. The physical storage device is not restricted to an HDD andcan also be an SSD (Solid State Drive) or a DVD for instance. Moreover,at least one HDD 240 can be collected up in a unit of a parity group,and a high reliability technique such as a RAID (Redundant Arrays ofIndependent Disks) can also be used.

The maintenance terminal 270 that is configured to maintain the storagesystem 200 is coupled to the storage system 200 via a bus 280. Themaintenance terminal 270 is provided with a CPU 271, a memory 272, aninput/output part 274, and a maintenance port 275. The memory 272 storesa program for a maintenance (a maintenance program) 273. The CPU 271executes the maintenance program 273 to execute a maintenanceprocessing. The input/output part 274 is configured by a mouse, akeyboard, a display and so on for instance. The input/output part 274receives a wide variety of instruction inputs from an operator whocarries out the maintenance, and displays a wide variety of informationon a display. The maintenance port 275 mediates a communication with thestorage system 200.

FIG. 13 is a view illustrating a copy of a volume and a journal volumein accordance with the embodiment 1.

For the primary storage system 200A, a PVOL (Primary Volume) 251 ismanaged as a storage region that stores the business data that isrelated to the business processing by the primary host 100A. For thesecondary storage system 200B, a SVOL (Secondary Volume) 254 that isconfigured to store the copy of the business data that has been storedinto the PVOL 251 is managed. Here, the PVOL 251 and the SVOL 254 arecalled a copy pair.

The primary storage system 200A stores a JVOL (Journal Volume) 252 thatis used as a buffer region (a buffer part) that is configured totemporarily store at least one JNL (Journal) that indicates a history ofa write to the PVOL 251. The JNL includes a JNCB (journal Control Block)2523 and the JNL data 2524. The JNCB 2523 includes the controlinformation such as a storage address for the JVOL 252 of the JNL data,a write address for the PVOL 251, and an occurrence order of the JNL,that is, a sequence number that indicates a write order of data to thePVOL 251. The JNL data 2524 is data that is equivalent to data (writedata) that has been written from the primary host 100A to the PVOL 251.

The JVOL 252 includes a JNBC region 2521 that stores the JNCB 2523 and aJNL data region 2522 that stores the JNL data 2524. The JVOL 252 can beconfigured by a plurality of volumes and can store a JNL to a pluralityof PVOLs 251.

The secondary storage system 200B stores a JVOL 253 that is stored on atemporary basis in the case in which a JNL that is stored into the JVOL252 of the primary storage system 200A is received. The configuration ofthe JVOL 253 is equivalent to that of the JVOL 252. The number of theJVOLs 252 of the primary storage system 200A and the number of the JVOL253 of the secondary storage system 200B can be different from eachother.

An operation summary of an asynchronous copy processing for the computersystem 10 will be described in the following.

In the case in which a write of data from the primary host 100A to thePVOL 251 occurs, the primary storage system 200A stores data that hasbeen written to the PVOL 251, generates a JNL that is related to thewrite data and stores a JNL into the JVOL 252.

After that, the primary storage system 200A acquires a JNL from the JVOL252 and transmits the JNL to the secondary storage system 200B. Thesecondary storage system 200B stores the received JNL to the JVOL 253.

In the next place, the secondary storage system 200B acquires the JNLdata 2524 in a JNL of the JVOL 253 in accordance with an order of awrite from the primary host 100A to the PVOL 251, and generates a copyof the PVOL 251 to the SVOL 254 by writing the JNL data 2524 to the SVOL254. The order that has been written to the PVOL 251 can be implementedby a sequence number.

A capacity of the JVOL 252 will be described in the following. In thecase in which a circuit disturbance occurs between the primary storagesystem 200A and the secondary storage system 200B for instance, a JNLstarts to remain for the JVOL 252. In the case in which the circuitdisturbance is resolved after that, a JNL of the JVOL 252 is transmittedto the JVOL 253 of the secondary storage system 200B. Consequently, inthe case in which the JVOL 252 is provided with a capacity sufficient tostore JNLs that have been generated, a remote copy can be continuedwithout stopping a remote copy. A capacity of the JVOL 252 is designedin accordance with a time in which the capacity can withstand a circuitdisturbance. In general, a capacity of the JVOL 252 is a large capacityand is extremely larger than that of a cache part 223 of the memorypackage 220 for instance. In the case in which a capacity of a cachepart 223 is 1 TB for instance, a capacity of the JVOL 252 is severaltens TB for instance.

FIG. 14 is a view illustrating a summary of an operation in a data writein accordance with the embodiment 1.

In the case in which a write request is transmitted from the host 100Ato the volume 250 of the primary storage system 200A, the primarystorage system 200A stores the write data from the host 100A into thecache part 223 of the primary storage system 200A. After that, theprimary storage system 200A stores the write data of the cache part 223into the volume 250 (PVOL 251) asynchronously with the write request.Moreover, a JNL is stored into the cache part 223 and is then storedinto the volume (JVOL 252) similarly to the data that has been acquiredfrom the host 100A.

FIG. 15 is a detailed block diagram showing a memory package inaccordance with the embodiment 1.

The control information part 221 of the memory package 220 stores thesequence number information 2210, the JNL pointer information 2211, theblock management bitmap 2212, the current block information 2213, thecurrent address information 2214, and the in-block maximum sequencenumber information 2215.

The program part 222 stores a write program 2221, a JNL creation program2222, a JNL data storage address decision program 2223, a block releaseprogram (primary) 2224, a block release program (secondary) 2225, a JNLread program (primary) 2226, a JNL read program (secondary) 2227, and arestore program 2228. In the present embodiment, in consideration of thecase in which one storage system is operated as the primary storagesystem 200A and the case in which one storage system is operated as thesecondary storage system 200B, one storage system stores a program thatis necessary to be operated as any of the primary storage system 200Aand the secondary storage system 200B. In the case in which one storagesystem is operated as only one of the primary storage system 200A andthe secondary storage system 200B, it is not necessary for the storagesystem to be provided with all programs.

FIG. 16 is a view showing an example of the sequence number informationin accordance with the embodiment 1.

The sequence number information 2210 stores a sequence number thatindicates an order in which the storage system 200 receives a write fromthe primary host 100A. The sequence number is a sequence number of a JNLthat has occurred recently for instance. FIGS. 17 to 19 are theinformation for managing a usage situation of the JVOL 252.

FIG. 17 is a view showing an example of a block management bitmap inaccordance with the embodiment 1. FIG. 18 is a view showing an exampleof the current block information in accordance with the embodiment 1.FIG. 19 is a view showing an example of the current address informationin accordance with the embodiment 1. FIG. 20 is a view illustrating ablock management bitmap, a current block, and a current address inaccordance with the embodiment 1.

The block management bitmap 2212 stores a value that indicates whethereach block of the JVOL 252 is being used or is not used as shown in FIG.17. In the present embodiment, a bit value 1 is set in the case in whichthe corresponded block BK is being used, and a bit value 0 is set in thecase in which the corresponded block BK is not used. In the presentembodiment, the JVOL 252 is classified into a plurality of blocks of apredetermined common fixed size and is managed. Each block is in a sizecapable of storing a plurality of JNL data and a size that issufficiently smaller than a capacity of the cache part 223. Morespecifically, in the case in which a capacity of the cache part 223 is 1TB for instance, a size of a block can be 10 MB. Moreover, a size of theJVOL 252 can be several ten TB for instance.

Since the present embodiment shows an example in which each block has acommon fixed size, a flag of 1 bit is managed to each block for theblock management bitmap 2212. However, in the case in which each blockhas a different size for instance, a start address, an end address, anda flag of each block can be corresponded to each other to be managed.

The current block information 2213 stores a block number of a currentblock as shown in FIG. 18. The current block is a target block BK (ablock of a block number 1 in the figure) that stores a current JNL (JNLdata 2524 in this example) as shown in FIG. 20.

The current address information 2214 stores a current address of acurrent block as shown in FIG. 19. The current address is an addressthat indicates a range that has been used in a current block, that is, arange that has stored the JNL data 2524 as shown in FIG. 20.

FIG. 21 is a view showing an example of the in-block maximum sequencenumber information in accordance with the embodiment 1. The informationshown in FIG. 21 is the information that is used for the releaseprocessing of a block that is described in FIG. 24.

The in-block maximum sequence number information 2215 stores a record towhich the fields of a block number (#) 2215 a and an in-block maximumsequence number 2215 b are corresponded. The block number (#) 2215 astores the number of a block (a block #) of the JVOL 252. The in-blockmaximum sequence number 2215 b stores a maximum sequence number (anin-block maximum sequence number) of a JNL that has been stored into thecorresponded block. For the in-block maximum sequence number information2215 shown in FIG. 21, it is found that a maximum sequence number of aJNL (JNL data 2524) that has been stored into a block of a block # “3”is “350”.

In the next place, an operation of the computer system in accordancewith the embodiment 1 will be described in the following.

FIG. 22 is a flowchart of a processing in a write in accordance with theembodiment 1.

In the case in which a write program 2221 receives a write request fromthe host 100A to the PVOL 251 (step S101), the write program 2221 writesthe data of a write target (write data) to the volume 250 (such as thePVOL 251) (step S102). In the next place, the write program 2221 calls ajournal creation program (step S103) and waits a completion of thejournal (JNL) creation program 2222 (step S104).

In the case in which the journal creation program 2222 is called, thejournal creation program 2222 ensures a sequence number of a JNL that isto be created (step S201) and calls the JNL data storage addressdecision program 2223 (step S202). By these steps, the JNL data storageaddress decision processing (see FIG. 23) is executed, an address of aJVOL that stores the JNL data is decided, and the journal creationprogram 2222 is notified of the address.

In the next place, the journal creation program 2222 stores the JNL data2524 as the data that is stored to the notified address of the JVOL 252into the cache part 223 (step S203).

In the next place, the journal creation program 2222 decides an addressof the JVOL 252 that stores the JNCB 2523 (step S204) and stores theJNCB 2523 as the data that is stored to the decided address of the JVOL252 into the cache part 223 (step S205). Here, the address that storesthe JNCB 2523 is decided as an address next to the JNCB 2523 that hasbeen stored or a leading head address of a JNCB region 2521 in the casein which the JNCB 2523 is stored up to the last of the JNCB region 2521.

In the next place, the journal creation program 2222 notifies the writeprogram 2221 of a completion of a processing (step S206). The writeprogram 2221 that has received the notification notifies the host 100Aof a completion report of a write (step S105) and terminates theprocessing.

FIG. 23 is a flowchart of a JNL data storage address decision processingin accordance with the embodiment 1.

A JNL data storage address decision program 2223 acquires a block numberof a current block from the current block information 2213 (step S301)and judges whether or not the new JNL data 2524 can be stored into thecurrent block, that is, whether or not the current block has a freespace (step S302).

In the case in which the current block has a free space (Yes for thestep S302) as a result of the judgment, the JNL data storage addressdecision program 2223 proceeds to the step S305. On the other hand, inthe case in which the current block has no free space (No for the stepS302) as a result of the judgment, the JNL data storage address decisionprogram 2223 searches a free block (step S303). In the presentembodiment, the JNL data storage address decision program 2223 searchesa block that is provided with a bit value of “0” from a leading head ofa block management bitmap 2212.

In the next place, the JNL data storage address decision program 2223allocates the identified block as a block that stores the JNL data 2524and proceeds to a processing of the step S305 (step S304). Morespecifically, the JNL data storage address decision program 2223modifies a bit value of the block management bitmap 2212 to theidentified block to be “1” and modifies a block number of the currentblock information 2213 to be a block number of the identified block.

In the step S305, the JNL data storage address decision program 2223decides an address that stores the JNL data 2524 of the correspondedblock. In the next place, the JNL data storage address decision program2223 updates a current address of the current address information 2214to be a decided address (step S306), updates a maximum sequence numberto the block of the in-block maximum sequence number information 2215 tobe a sequence number of the JNL data 2524 (step S307), and terminatesthe processing.

In accordance with the above JNL data storage address decisionprocessing, the JNL data 2524 can be stored on a preferential basis intoa region that is a block that is located close to the leading head ofthe JVOL 252 and that is provided with a free space and to which aregion of the cache part 223 has a high degree of probability of havingbeen allocated. By this configuration, regions to which the JNL data2524 is stored can be aggregated to a comparatively small range, and anoccurrence of a processing for newly allocating a region of a cache partcan be reduced in the case in which the JNL data is stored. Anallocating method of a block that stores the JNL data is not restrictedto the method. For instance, a free block that has been used mostrecently can be allocated as a block that stores the JNL data 2524. Bythis configuration, there is a higher possibility that a region that iscorresponded to a region of the free block is managed by the cache part223, and there is a high possibility that a region of the cache part 223can be used without executing processing for allocating a region of thecache part to the region in the case in which data is stored into thefree block. As a method for acquiring a free block that has been usedmost recently, the free block can be managed by a stack.

FIG. 24 is a flowchart of a block release processing in accordance withthe embodiment 1.

The block release processing is executed on a regular basis by the blockrelease program (primary) 2224 for the primary storage system 200A forinstance. Alternatively, the block release processing is called in theJNL read processing shown in FIG. 25, and executed.

The block release program (primary) 2224 refers to a sequence number ofa JNL that has been transmitted (a transmitted sequence number) (stepS401). The sequence number of a JNL that has been transmitted is storedinto the control information part 221 by the primary storage system 200Afor instance.

In the next place, the block release program (primary) 2224 identifies ablock that is not a current block and in which the block managementbitmap 2212 is ON (a bit value is “1”) (step S402).

In the next place, the block release program (primary) 2224 acquires thein-block maximum sequence number of each block that has been identifiedfrom the in-block maximum sequence number information 2215 (step S403),and judges whether or not the in-block maximum sequence number that hasbeen acquired for each block is smaller than a transmitted sequencenumber that has been referred to (step S404).

In the case in which the in-block maximum sequence number that has beenacquired is smaller than a transmitted sequence number that has beenreferred to (Yes for the step S404) as a result of the judgment, sinceit means that all JNLs of the block have been transmitted to thesecondary storage system 200B, the block release program (primary) 2224sets a bit value that is corresponded to the block of the blockmanagement bitmap 2212 to be OFF (“0”) to make the block to be a freeblock (step S405). On the other hand, in the case in which the in-blockmaximum sequence number that has been acquired is not smaller than atransmitted sequence number that has been referred to (No for the stepS404) as a result of the judgment, since it means that all JNLs of theblock have not been transmitted to the secondary storage system 200B,the processing is terminated.

For the block release processing, all blocks in which the JNL data hasbeen transmitted can be made a free block and can be used for thesubsequent storage of the JNL data.

FIG. 25 is a flowchart of a JNL read processing in accordance with theembodiment 1.

The JNL read program (secondary) 2227 of the secondary storage system200B issues a JNL read command to the primary storage system 200A (stepS601) and waits a response from the primary storage system 200A (stepS602). The JNL read command includes a sequence number of a JNL that hasbeen transmitted to the secondary storage system 200B (a transmittedsequence number).

In the case in which the JNL read program (primary) 2226 receives theJNL read command, the primary storage system 200A reads the JNCB 2523that has not been transmitted (step S501). Here, the JNCB 2523 that hasnot been transmitted is identified based on the information that ismanaged by the primary storage system 200A. In the present embodiment,since the JNCB 2523 is arranged in a sequence number order, the JNCB2523 that has not been transmitted can be easily identified by managingthe JNCB 2523 that has not been transmitted by using a pointer.

In the next place, the JNL read program (primary) 2226 identifies astorage location of the JNL data 2524 by acquiring an address of the JNLdata 2524 from the JNCB 2523 that has read (step S502) and reads the JNLdata of the storage location that is corresponded (step S503). Here, inthe case in which the JNL data 2524 that is corresponded has been storedinto the cache part 223, the JNL read program (primary) 2226 reads theJNL data 2524 from the cache part 223. In the case in which the JNL data2524 that is corresponded has not been stored into the cache part 223,the JNL read program (primary) 2226 reads the JNL data 2524 from theJVOL 252.

In the next place, the JNL read program (primary) 2226 transmits the JNLthat has been read (the JNCB 2523 and the JNL data 2524) to thesecondary storage system 200B (step S504). In the next place, the JNLread program (primary) 2226 stores the sequence number that has beentransmitted into the control information part 221 (step S505), calls theblock release program (primary) 2224 (step S506), and terminates theprocessing. By these steps, the block release processing is executed(see FIG. 24).

On the other hand, in the case in which the secondary storage system200B receives a JNL from the primary storage system 200A (step S603),the JNL read program (secondary) 2227 calls the JNL data storage addressdecision program 2223 (step S604). For the secondary storage system200B, the JNL data storage address decision processing that is similarto that of FIG. 23 is executed, and a block and an address of the JVOL253 that stores the JNL data 2524 are decided.

In the next place, the JNL read program (secondary) 2227 stores the JNLdata 2524 into the cache part 223 as data that is stored into an addressof the decided block of the JVOL 253 (step S605).

In the next place, the JNL read program (secondary) 2227 decides anaddress of the JVOL 253 that stores the JNCB 2523 (step S606), storesthe JNCB 2523 into the cache part 223 as data that is stored to thedecided address of the JVOL 253 (step S607), and terminates theprocessing. Here, the address that stores the JNCB 2523 is decided as anaddress next to the JNCB 2523 that has been stored or a leading headaddress of a JNCB region 2521 in the case in which the JNCB 2523 isstored up to the last of the JNCB region 2521.

In accordance with the above JNL read processing, the JNL data 2524 canbe stored on a preferential basis into a region that is a block that islocated close to the leading head of the JVOL 253 and that is providedwith a free space and to which a region of the cache part 223 has a highdegree of probability of having been allocated. By this configuration,regions to which the JNL data 2524 is stored can be aggregated to acomparatively small range, and an occurrence of a processing for newlyallocating a cache part can be reduced in the case in which the JNL data2524 is stored. An allocating method of a block is not restricted to themethod. For instance, a free block that has been used most recently canbe allocated as a block that stores the JNL data. By this configuration,there is a higher possibility that a region that is corresponded to aregion of the free block is managed by the cache part 223, and there isa high possibility that a region of the cache part 223 can be usedwithout executing processing for allocating a region of the cache part223 to the region in the case in which data is stored into the freeblock.

FIG. 26 is a flowchart of a restore processing in accordance with theembodiment 1.

The restore processing is a processing for writing to the SVOL 254 basedon a JNL and is executed on a regular basis for the secondary storagesystem 200B for instance.

The restore program 2228 checks a JNCB that has been stored into theJVOL 253 (step S701) and identifies a range of a JNL that has reachedthe secondary storage system 200B without a miss (step S702). Here,since the JNCB 2523 of a JNL that has not reached is all 0, a range of aJNL that has reached can be identified in an appropriate manner.

In the next place, the restore program 2228 identifies a maximumsequence number of a JNL in a range that has been identified (step S703)and stores the maximum sequence number as a sequence number that hasbeen transmitted into the control information part 221 (step S704).

In the next place, the restore program 2228 acquires a JNL up to asequence number that has been transmitted from the JVOL 253 and writesthe JNL to the SVOL 254 in an order of a sequence number, that is,restores the JNL (step S705). In the case in which the corresponded JNLdata 2524 has been stored into the cache part 223 for an acquisitionfrom the JVOL 253, the restore program 2228 reads the JNL data 2524 fromthe cache part 223. In the case in which the corresponded JNL data 2524has not been stored into the cache part 223, the restore program 2228reads the JNL data 2524 from the JVOL 253. Moreover, in a write to theJVOL 254, the restore program 2228 stores the JNL data 2524 into thecache part 223 as the data of an write address of the JVOL 254.

In the next place, the restore program 2228 stores the maximum sequencenumber that has been restored as a restored sequence number into thecontrol information part 221 (step S706) and calls the block releaseprogram (secondary) 2225 (step S707). The block release program(secondary) 2225 executes the block release processing.

More specifically, the block release program (secondary) 2225 refers tothe sequence number that has been restored (step S801) and identifies ablock that is not a current block and in which the block managementbitmap 2212 is ON (a bit value is “1”) (step S802).

In the next place, the block release program (secondary) 2225 acquiresthe in-block maximum sequence number of each block that has beenidentified from the in-block maximum sequence number information 2215(step S803), and judges whether or not the in-block maximum sequencenumber that has been acquired for each block is smaller than a restoredsequence number that has been referred to (step S804).

In the case in which the in-block maximum sequence number that has beenacquired is smaller than a restored sequence number that has beenreferred to (Yes for the step S804) as a result of the judgment, sinceit means that all JNLs of the block have been restored to the SVOL 254,the block release program (secondary) 2225 sets a bit value that iscorresponded to the block of the block management bitmap 2212 to be OFF(“0”), to make the block to be a free block (step S805), terminates theprocessing (step S806), and notifies the restore program 2228 of that.On the other hand, in the case in which the in-block maximum sequencenumber that has been acquired is not smaller than a restored sequencenumber that has been referred to (No for the step S804) as a result ofthe judgment, the block release program (secondary) 2225 terminates theprocessing (step S806) and notifies the restore program 2228 of that. Inthe case in which the restore program 2228 receives the notification ofthat the processing has been terminated from the block release program(secondary) 2225, the restore program 2228 terminates the restoreprocessing.

For the block release processing, all blocks in which a restore has beenexecuted by the JNL data can be made a free block and can be used forthe subsequent storage of the JNL data.

Embodiment 2

In the next place, the computer system in accordance with the embodiment2 will be described in the following.

While the JNL data 2524 of a JNL is managed based on a block for thecomputer system in accordance with the embodiment 1, the JNCB 2523 of aJNL is also managed based on a block similarly for the computer systemin accordance with the embodiment 2. The elements that are equivalent tothose of the computer system in accordance with the embodiment 1 arenumerically numbered similarly and the different points will be mainlydescribed.

FIG. 27 is a detailed view showing a control information part inaccordance with the embodiment 2. FIG. 28 is a detailed view showing aprogram part in accordance with the embodiment 2.

The control information part 221 in accordance with the embodiment 2further stores the JNCB block management information 2216, the currentwrite block information 2217, the current read block information 2218,the current write address information 2219, and the current read addressinformation 221A to the control information part 221 in accordance withthe embodiment 1.

The program part 222 in accordance with the embodiment 2 further storesthe JNCB storage address decision program 2229 to the program part 222in accordance with the embodiment 1.

FIG. 29 is a view showing an example of the JNCB block managementinformation in accordance with the embodiment 2. FIG. 30 is a viewshowing an example of the JNCB current write block information inaccordance with the embodiment 2. FIG. 31 is a view showing an exampleof the JNCB current read block information in accordance with theembodiment 2. FIG. 32 is a view showing an example of the JNCB currentwrite address information in accordance with the embodiment 2. FIG. 33is a view showing an example of the JNCB current read addressinformation in accordance with the embodiment 2. FIG. 34 is a viewillustrating a block and an address in accordance with the embodiment 2.

The JNCB block management information 2216 is the information formanaging an order of a block in which the JNCB 2523 is stored. Morespecifically, a block number of a block in which the JNCB 2523 is storedand a block of the next order, that is, a block number of a block inwhich the subsequent JNCB 2523 is stored are corresponded to each otherfor a management. In accordance with the JNCB block managementinformation 2216, as shown in FIG. 34, a block of the next order inwhich the subsequent JNCB 2523 is stored can be identified.

The JNCB current write block information 2217 is the information forstoring a block number of a current write block as shown in FIG. 30. Thecurrent write block is a block in which a new JNCB 2523 is to be storedas shown in FIG. 34.

The JNCB current read block information 2218 is the information forstoring a block number of a current read block as shown in FIG. 31. Thecurrent read block is a block in which a JNCB 2523 that is transmittedin the next place is stored as shown in FIG. 34.

The JNCB current write address information 2219 is the information forstoring a current write address of a current write block as shown inFIG. 32. The current write address is an address in a block in which anew JNCB 2523 is stored as shown in FIG. 34.

The JNCB current read address information 221A is the information forstoring a current read address of a current read block as shown in FIG.33. The current read address is an address in a block in which a JNCB2523 that is transmitted in the next place is stored as shown in FIG.34.

In the next place, an operation of the computer system in accordancewith the embodiment 2 will be described in the following. For anoperation of the computer system in accordance with the embodiment 2, aprocessing for deciding a storage address of the JNCB for the primarystorage system 200A, a processing for deciding a storage address of theJNCB for the secondary storage system 200B, a processing for reading theJNCB from the JVOL 252 of the primary storage system 200A, and aprocessing for reading the JNCB from the JVOL 253 of the secondarystorage system 200B are different from those of an operation of thecomputer system in accordance with the embodiment 1. For a block inwhich the JNCB 2523 has been stored, the block release processing can beexecuted by a processing similar to that of a block in which the JNLdata 2524 has been stored.

FIG. 35 is a flowchart of a JNCB storage address decision processing inaccordance with the embodiment 2.

The JNCB storage address decision processing is executed for each of theprimary storage system 200A and the secondary storage system 200B. Forthe primary storage system 200A, the JNCB storage address decisionprocessing is called in the S204 of the journal creation program 2222.

A JNCB storage address decision program 2229 acquires a block number ofa current block from the current write block information 2217 (stepS901), acquires a current write address from the current write addressinformation 2219 (step S902), and judges whether or not the JNCB 2523can be stored into the current write block, that is, whether or not thecurrent block has a free space (step S903).

In the case in which the current write block has a free space (Yes forthe step S903) as a result of the judgment, the JNCB storage addressdecision program 2229 proceeds to the step S906. On the other hand, inthe case in which the current write block has no free space (No for thestep S903) as a result of the judgment, the JNCB storage addressdecision program 2229 searches a free block (step S904). In the presentembodiment, the JNCB storage address decision program 2229 searches ablock that is provided with a bit value of “0” from a leading head of ablock management bitmap 2212.

In the next place, the JNCB storage address decision program 2229allocates the identified block as a block that stores the JNCB 2523 andproceeds to a processing of the step S906 (step S905). Morespecifically, the JNCB storage address decision program 2229 modifies abit value of the block management bitmap 2212 to the identified block tobe “1” and modifies a block number of the current write blockinformation 2217 to be a block number of the identified block.

In the step S906, the JNCB storage address decision program 2229 decidesan address that stores the JNCB 2523 of the corresponded block. In thenext place, the JNCB storage address decision program 2229 updates acurrent address of the current write address information 2219 to be adecided address (step S907), updates a maximum sequence number to theblock of the in-block maximum sequence number information 2215 to be asequence number of the JNCB 2523 (step S908), and terminates theprocessing.

In accordance with the above JNCB storage address decision processing,the JNCB 2523 can be stored on a preferential basis into a region thatis a block that is located close to the leading head of the JVOL 252 andthat is provided with a free space and to which a region of the cachepart 223 has a high degree of probability of having been allocated. Bythis configuration, regions to which the JNCB 2523 is stored can beaggregated to a comparatively small range, and an occurrence of aprocessing for newly allocating a region of a cache part can be reducedin the case in which the JNCB 2523 is stored. An allocating method of ablock is not restricted to the method. For instance, a free block thathas been used most recently can be allocated as a block that stores theJNCB 2523. By this configuration, there is a higher possibility that aregion that is corresponded to a region of the free block is managed bythe cache part 223, and there is a high possibility that a region of thecache part 223 can be used without executing processing for allocating aregion of the cache part 223 to the region in the case in which data isstored into the free block. As a method for acquiring a free block thathas been used most recently, the free block can be managed by a stack.

FIG. 36 is a flowchart of a JNL read processing in accordance with theembodiment 2. The parts that are equivalent to those of the JNL readprocessing (see FIG. 25) in accordance with the embodiment 1 arenumerically numbered similarly and the different points will be mainlydescribed.

In the case in which the JNL read program (primary) 2226 receives theJNL read command, the primary storage system 200A acquires a currentread block number from the current read block information 2218 (stepS1001) and acquires a current read address from the current read addressinformation 221A (step S1002). In the next place, the JNL read program(primary) 2226 judges whether or not a current read block and a currentwrite block are equivalent to each other (step S1003).

In the case in which a current read block and a current write block arenot equivalent to each other (No for the step S1003) as a result of thejudgment, the JNL read program (primary) 2226 reads the JNCB 2523 fromthe current read address to the end of the current read block (stepS1004), identifies the next block based on the JNCB block managementinformation 2216, makes the block to be a current read block (stepS1005), sets the current read address of the current read addressinformation 221A to be “0” (step S1006), and proceeds to the step S1009.By these steps, in the case in which the JNL read processing is executedafter that, the JNCB 2523 can be read from the subsequent block in anappropriate manner.

On the other hand, in the case in which a current read block and acurrent write block are equivalent to each other (Yes for the stepS1003) as a result of the judgment, the JNL read program (primary) 2226reads the JNCB 2523 from the current read address to the current writeaddress (step S1007), sets the current read address to be an addressthat has been read (an address equal to the current write address) (stepS1008), and proceeds to the step S1009.

In the step S1009, the JNL read program (primary) 2226 identifies astorage location of the JNL data 2524 from the JNCB 2523 that has beenread (step S1009). After that, the JNL read program (primary) 2226executes the processing of the step S503 and the subsequent steps.

On the other hand, the JNL read program (secondary) 2227 stores the JNLdata 2524 into the cache part 223 as data that is stored into an addressof the decided block of the JVOL 253 (step S605) and calls the JNCBstorage address decision program 2229 (step S1101). After that, the JNLread program (secondary) 2227 acquires a block and an address of theJVOL 253 that stores the JNCB 2523 from the JNCB storage addressdecision program 2229.

FIG. 37 is a flowchart of a restore processing in accordance with theembodiment 2. The parts that are equivalent to those of the restoreprocessing (see FIG. 26) in accordance with the embodiment 1 arenumerically numbered similarly and the different points will be mainlydescribed.

The restore processing is executed on a regular basis for the secondarystorage system 200B for instance.

The restore program 2228 acquires a current read block number from thecurrent read block information 2218 (step S1201) and acquires a currentread address from the current read address information 221A (stepS1202). In the next place, the restore program 2228 reads the JNCB 2523to the end of the current read block (step S1203) and identifies a rangeof a JNL that has reached the secondary storage system 200B without amiss (step S1204). Here, since the JNCB 2523 of a JNL that has notreached is all 0, a range of a JNCB 2523 that has reached can beidentified in an appropriate manner.

In the next place, the restore program 2228 judges whether or not theend of the range that has been identified is an end of the current readblock (step S1205). In the case in which the end of the range that hasbeen identified is an end of the current read block (Yes for the stepS1205) as a result of the judgment, the restore program 2228 sets acurrent read address of the current read address information 221A to be0, identifies the next block based on the JNCB block managementinformation 2216, sets the block to be a current read block (stepS1206), and proceeds to the step S703. By these steps, in the case inwhich the restore processing is executed after that, the JNCB 2523 canbe read in an appropriate manner from the subsequent block in which theJNCB 2523 has been stored.

On the other hand, in the case in which the end of the range that hasbeen identified is not an end of the current read block (No for the stepS1205) as a result of the judgment, the restore program 2228 sets acurrent read address of the current read address information 221A to bean address of the end of the range that has been identified (stepS1207), and proceeds to the step S703.

In accordance with the above embodiment 2, the JNCB 2523 can be storedon a preferential basis into a region that is a block that is locatedclose to the leading head of the JVOL 253 and that is provided with afree space and to which a region of the cache part 223 has a high degreeof probability of having been allocated. By this configuration, regionsto which the JNCB 2523 is stored can be aggregated to a comparativelysmall range, and an occurrence of a processing for newly allocating aregion of a cache part can be reduced in the case in which the JNCB 2523is stored.

Embodiment 3

In the next place, the computer system in accordance with the embodiment3 will be described in the following.

While the JVOL 252 and the JVOL 253 are managed based on a plurality ofblocks of a common fixed length for the computer system in accordancewith the embodiment 2, the JVOL 252 and the JVOL 253 are managed basedon two types of blocks of different sizes for the computer system inaccordance with the embodiment 3. Consequently, the number of blocks forthe JVOL 252 and the JVOL 253 is reduced and the information that isrequired for a block management is reduced in accordance with theembodiment 3.

FIG. 38 is a view illustrating a summary of an embodiment 3.

In the present embodiment, the JVOL 252 (253) is divided into aplurality of (four in the figure) blocks of a small size (a smallcapacity) (a small size block) SBK and one block of a large size (alarge capacity) (a large size block) LBK to be managed. By thisconfiguration, the control information amount for managing a block, forinstance, the information amount of the information of the blockmanagement bitmap 2212 and the in-block maximum sequence numberinformation 2215 can be reduced in addition to the effects of the abovedescribed embodiments 1 and 2.

There is a possibility that a write amount from the host 100A is sharplyincreased on a temporary basis to exceed a pace in which a small sizeblock of the JVOL 252 is released. In this case, a JNL is stored intothe large size block LBK in some cases. After a reduction in a writeamount, a processor load can be reduced by using a small size block asdescribed in the embodiment 1. However, in a logic that has described inthe embodiment 1, a JNL is stored into the large size block LBK untilall regions of the large size block LBK is used up.

In the case in which a JNL is stored into the large size block LBK untilall regions of the large size block LBK is used up as described above, aprocessing for destaging a JNL that has been transmitted, a processingfor allocating a region of the cache part 223, and a processing forreleasing a region of the cache part 223 are executed, whereby a load tothe processor is increased.

Consequently, in the embodiment 3, a control is executed in such amanner that a JNL can be stored into the small size block SBK evenbefore all regions of the large size block LBK is used up.

FIG. 39 is a detailed view showing a control information part inaccordance with the embodiment 3.

The control information part 221 in accordance with the embodiment 3further stores the current block size information 221B to the controlinformation part 221 in accordance with the embodiment 2. The currentblock size information 221B stores the information that indicateswhether a size of a current block is a large size or a small size

FIG. 40 is a flowchart of a JNL data storage address decision processingin accordance with the embodiment 3. The parts that are equivalent tothose of the JNL data storage address decision processing (see FIG. 23)in accordance with the embodiment 1 are numerically numbered similarlyand the different points will be mainly described.

In the case in which it is decided that the current block has a freespace in the step S302 (Yes for the step S302), the JNL data storageaddress decision program 2223 judges whether or not the current blockhas a large size and a predetermined return condition is satisfied (stepS308). Here, the predetermined return condition is a condition forjudging whether or not an operation is possible by only a block of asmall size in the case in which a remaining amount of the current JNLdata 2524 is continued. For instance, the predetermined return conditionis a condition in which “an average JNL data amount that remains in thecurrent JVOL 252<the total free capacity of a small size block” inaddition to “a small size block has a free space”. Moreover, inconsideration of a variation of an occurrence of the JNL data 2524 afterthat, “an average JNL data amount that remains in the current JVOL 252”can be replaced by “an average JNL data amount that remains in thecurrent JVOL 252+A” (A is a predetermined data amount).

In the case in which the current block has a large size and apredetermined return condition is satisfied (Yes for the step S308) as aresult of the judgment, the JNL data storage address decision program2223 proceeds to the step S303 and executes the subsequent processing.By this configuration, the JNL data 2524 can be stored into a small sizeblock from a state in which a large size block is free, and theexecution of a processing for destaging a JNL that has been transmitted,a processing for allocating a region of the cache part 223, and aprocessing for releasing a region of the cache part 223 can be reducedin an appropriate manner. In the case in which the current block has asmall size or a predetermined return condition is not satisfied (No forthe step S308), the JNL data storage address decision program 2223proceeds to the step S305.

The JNL data storage address decision processing has been describedabove. However, a processing for deciding a storage address for the JNCB2523 (JNCB storage address decision processing) can also be implementedby adding a step that is similar to the step S308 for the JNCB storageaddress decision processing of the embodiment 2 (see FIG. 35).

FIG. 41 is a view illustrating a modified example in accordance with theembodiment 3.

In the above described example, there is one large size block LBK forthe JVOL 252 (253). In this case, as shown in the state 1, in the casein which the large size block LBK has a free region LS and the JNL data2524 is stored into the small size block SBK, the large size block LBKis managed as a block that is being used before all of the JNL data 2524that has been stored is transmitted. Consequently, even in the case inwhich an occurrence of the JNL data 2524 is sharply increased, asituation in which a free region LS is not used occurs.

On the other hand, as shown in the state 2 for instance, it is thoughtthat the JVOL 252 is provided with a plurality of large size blocks LBK.For instance, a size of the large size block LBK can be a common size.In the case in which a plurality of large size blocks LBK is providedwith as described above, other large size blocks LBK can be used,whereby a capacity of a useless free region can be reduced.

Embodiment 4

In the next place, the computer system in accordance with the embodiment4 will be described in the following.

For the computer system in accordance with the embodiment 4, the JVOL252 and the JVOL 253 are configured with a virtual volume (a virtualVOL) by using a capacity virtualization function (Thin Provisioning) inthe above described embodiment.

FIG. 42 is a view illustrating a virtual volume in accordance with theembodiment 4.

The storage system 200 (200A, 200B) is provided with a capacity pool (apool) 290 that is configured by a plurality of storage regions of HDDs240. The pool 290 includes a pool volume (a pool VOL) 291 that isconfigured by a physical storage region of an HDD 240. The pool VOL 291includes a page that is a physical region that is an allocation unit ofa virtual VOL 293. A capacity of a page is in the range of several KB toseveral tens MB.

In the case in which data is written to a predetermined region for thevirtual VOL 293, a page 292 of the pool VOL 291 is allocated to theregion. In the present embodiment, the JVOLs 252, 253 is configured asthe virtual VOL 293. Consequently, since a page 292 is not allocated toa region in which the JVOLs 252, 253 is not used, a storage region ofthe HDD 240 can be used in an effective manner. Since the JVOLs 252, 253is not used by a wraparound method in the present embodiment inparticular unlike the conventional system, an allocation amount of apage can be reduced.

FIG. 43 is a view showing an example of a pool table in accordance withthe embodiment 4.

A pool table 224 is a table that is configured to manage each page 292of the pool 290 and is stored into the control information 221 of thememory package 220.

The pool table 224 manages a record to which the fields of a page number224 a, a start address 224 b, an end address 224 c, a state 224 d, andan allocation destination 224 e are corresponded. The page number 224 astores a page number that identifies a page 292 of the pool 290. Thestart address 224 b stores a start address of a page that iscorresponded. The end address 224 c stores an end address of a page 292that is corresponded. The state 224 d stores the information thatindicates whether the page 292 that is corresponded has been allocatedto the virtual volume 293 or has not been allocated to the virtualvolume 293. The allocation destination 224 e stores a virtual volumenumber to which the page 292 that is corresponded has been allocated. Inaccordance with the top record of the pool table 224, it is found thatthe start address is “0” and the end address is “99” for a page that isprovided with a page number of “1” and the page has been allocated tothe virtual volume 1.

FIG. 44 is a view showing an example of a virtual volume table inaccordance with the embodiment 4.

The virtual volume table 225 is a table that is configured to manage anallocation of a page 292 to the virtual volume 293 and is stored intothe control information 221 of the memory package 220.

The virtual volume table 225 manages a record that includes the fieldsof a virtual volume number 225 a, an address 225 b, a page allocationstate 225 c, and a page number 225 d. The virtual volume number 225 astores a virtual volume number that identifies a virtual volume 293. Theaddress 225 b stores a range of an address of the virtual volume 293that is corresponded. The page allocation state 225 c stores theinformation that indicates whether or not the page 292 has beenallocated to a region in the range of an address that is corresponded.The page number 225 d stores a page number that has been allocated to aregion that is corresponded. In accordance with the top record of thevirtual volume table 225, it is found that the page 292 that is providedwith a page number “2” has been allocated to a region of the addresses 0to 99 of the virtual volume that is provided with a virtual volumenumber “1”.

With reference to FIGS. 45 to 48, the following describes the processingfor releasing a page that is corresponded to only an unused block by ablock release. FIG. 45 is a flowchart of a block release processing inaccordance with the embodiment 4. A step S406 for calling a page releaseprogram is added immediately after the step S405 of the block releaseprogram (primary) 2224 shown in FIG. 24.

FIG. 46 is a view showing an example of a page release program that iscalled from the step S406 of the block release program (primary) 2224.FIG. 47 is a view showing an example of a correspondence relationshipbetween a block and a page in accordance with the embodiment 4. FIG. 48is a view showing another example of a page release program.

The processing of FIG. 46 will be described. The page release programidentifies at least one page 292 that is corresponded to the block BK(step S1501). A page that is corresponded to a block in which a blocknumber is 1 is a page A in the example of in FIG. 47. Moreover, a pagethat is corresponded to a block in which a block number is 2 is a page Aand a page B. In the next place, the page release program makes a pagethat has not been processed to be a processing target page (step S1502).In the case in which a block number of a processing target block is 2 inthe example shown in FIG. 47 for instance, the page A is a processingtarget at first. After the steps S1503 to S1505 are executed to the pageA, the steps S1503 to S1505 are executed to the page B. In the nextplace, the page release program identifies at least one block that iscorresponded to a page (step S1503). In the case in which the page Ashown in FIG. 47 is a processing target for instance, a block 1 and ablock 2 are identified.

In the next place, the page release program refers to the blockmanagement bitmap 2212 and judges whether or not all blocks that havebeen identified are free (step S1504). In the case in which all blocksthat have been identified are free (Yes for the step S1504) as a resultof the judgment, the page release program releases the page (step S1505)and proceeds to the step S1506. In other words, the page release programdeletes the allocation information of the corresponded page 292 from thepool table 224 and the virtual volume table 225 and proceeds to the stepS1506. On the other hand, in the case in which all blocks that have beenidentified are not free (No for the step S1504) as a result of thejudgment, the page release program proceeds to the step S1506.

In the step S1506, the page release program judges whether or not thereis a page 292 that has not been processed. In the case in which there isa page 292 that has not been processed (Yes for the step S1506) as aresult of the judgment, the page release program executes the processingfrom the step S1502. On the other hand, in the case in which there isnot a page 292 that has not been processed (No for the step S1506) as aresult of the judgment, the page release program terminates the pagerelease processing.

By the page release processing, the page 292 that has been allocated tothe block BK that has stored the JNL data 2524 that has been transmittedcan be released in an appropriate manner and can be used for anallocation to other region.

For the page release processing shown in FIG. 46, the page 292 that hasbeen allocated to a free block is released. However, there is a highpossibility that data is written to the small size block SBK after thatand a new page 292 is allocated to the small size block SBK.Consequently, as shown in FIG. 48, the page 292 that has been allocatedto the small size block SBK is not released and a load that is requiredfor a reallocation of the page 292 to the small size block SBK can bereduced.

FIG. 48 is a flowchart of a page release processing in accordance with amodified example of the embodiment 4. The parts that are equivalent tothose of the page release processing (see FIG. 46) are numericallynumbered similarly and the different points will be mainly described.

In the case in which all blocks are free (Yes for the step S1504) as aresult of the judgment, the page release program judges whether or notall blocks that have been identified are a large size block LBK (stepS1507). In the case in which all blocks that have been identified arelarge size blocks LBK (Yes for the step S1507) as a result of thejudgment, the page release program proceeds to the step S1505 andreleases the page 292. On the other hand, in the case in which allblocks that have been identified are not large size blocks LBK (No forthe step S1507) as a result of the judgment, the page release programproceeds to the step S1506 without releasing the page 292.

In accordance with this page release processing, the page 292 that hasbeen allocated to the small size block SBK is not released.Consequently, in the case in which the JNL data 2524 is stored into thesmall size block SBK after that, it is not necessary a processing thatis required for a reallocation of the page 292 is executed, whereby aprocessing load can be reduced.

The virtual volume 293 has a characteristic in which a capacity can beexpanded after the virtual volume 293 is created. Here, the processingin the case in which a capacity of the virtual volume 293 is expandedwill be described.

FIG. 49 is a first view illustrating an expansion of a journal volume inaccordance with the embodiment 4.

In the case in which a capacity of the JVOL 252 (253) that is shownbefore an expansion is expanded for instance, only a capacity of thelast block (a block of a block number 5 in the figure) of the JVOL 252can be expanded as shown after an expansion. In this case, since thenumber of blocks is not modified in accordance with an expansion of acapacity of the JVOL 252, the information amount of the block managementbitmap 2212 and the in-block maximum sequence number information 2215 isnot modified. Here, the last block can be comprehended as a range from astart address that is calculated by the expression of (a block size of asmall size block×the number of small size blocks)+(a block size of alarge size block×(the number of large size blocks−1)) to an end addressafter the expansion of the JVOL 252.

FIG. 50 is a second view illustrating an expansion of a journal volumein accordance with the embodiment 4.

In the case in which a capacity of the JVOL 252 that is shown before anexpansion is expanded for instance, the expanded capacity of the JVOL252 can be divided into a plurality of (32 for instance) blocks (addedblocks) ABK and can be managed as shown after an expansion. In thiscase, it is necessary that a record that is corresponded to theincreased blocks ABK is added to the block management bitmap 2212 andthe in-block maximum sequence number information 2215. By adopting sucha method, a problem in which a usage efficiency of a JVOL is reduced andthat has been described in the state 1 of FIG. 41 can be avoided.

Embodiment 5

In the next place, the computer system in accordance with the embodiment5 will be described in the following.

In the above described embodiment, a management is executed in such amanner that the JNL data 2524 and/or the JNCB 2523 are stored using ablock. However, for the computer system in accordance with theembodiment 5, the JNL data 2524 and/or the JNCB 2523 are stored withoutusing a block.

FIG. 51 is a view illustrating a summary of an embodiment 5.

In the present embodiment, as shown in the state 1, a region in whichthe JNL data 2524 that has not been transmitted has been stored can bemanaged by managing a pair (the region identification information) ofpointers of a leading head pointer (1) that indicates an address of aleading head of a storage destination of the JNL data 2524 that has notbeen transmitted for the JVOL 252 (253) and an end pointer (1) thatindicates an address of an end of the JNL data 2524 that has not beentransmitted (an address of a leading head of a storage destination ofthe JNL data that has been transmitted).

Here, the new JNL data 2524 is stored into a region of the JNL data 2524that has not been transmitted (a transmitted region) for instance. Inother words, in the case in which a region in which the JNL data 2524that has not been transmitted has been stored is reused, as shown in thestate 2, in order to manage a region (a second region) in which the JNLdata that has not been transmitted has been stored to a region that isreused, a region of the JNL data 2524 that has not been transmitted fora region that is reused is managed by using another pair of pointers (aleading head pointer (2) and an end pointer (2): the second regionidentification information).

Moreover, in the case in which the JNL data 2524 is stored to all ofregions that is reused, as shown in the state 3, the JNL data 2524 isstored into an unused region after the leading head pointer (1), and aregion (a third region) of the JNL data that has not been transmitted ismanaged by using another pair of pointers (a leading head pointer (3)and an end pointer (3)).

As described above, a region in which of the JNL data that has not beentransmitted has been stored can managed by using a pair of a pluralityof pointers (a leading head pointer and an end pointer). Here, inaccordance with an order of a pair of pointers that have been created,each JNL data 2524 of a region that is indicated by the pointers isarranged. By this configuration, it can be identified that the JNL data2524 of a region that is indicated by a pair of pointers that have beencreated beforehand is the JNL data 2524 that has been created before theJNL data 2524 of a region that is indicated by a pair of pointers thathave been created later. Consequently, an occurrence order of the JNLdata 2524 can be comprehended in an appropriate manner.

FIG. 52 is a detailed view showing a control information part inaccordance with the embodiment 5.

The control information part 221 in accordance with the embodiment 5further stores a pair of at least one leading head pointer 221C and atleast one end pointer 221D (for instance, a leading head pointer (1) andan end pointer (1)) to the control information part 221 in accordancewith the embodiment 4.

In the next place, an operation of the computer system in accordancewith the embodiment 5 will be described in the following. Here, anoperation that is different from that of the embodiment 4 will bedescribed.

FIG. 53 is a flowchart of a JNL data storage address decision processingin accordance with the embodiment 5.

A JNL data storage address decision program 2223 acquires a leading headpointer that is being used, that is, a leading head pointer that hasbeen created at last (step S1601) and judges whether or not there is afree region (a transmitted region) that is equal to or larger than apredetermined size before an address that is indicated by the pointer(step S1602).

In the case in which there is not a free region that is equal to orlarger than a predetermined size (No for the step S1602) as a result ofthe judgment, the JNL data storage address decision program 2223 judgeswhether or not the JNL data 2524 can be stored immediately after anaddress that is indicated by a leading head pointer that is being used(step S1603). In the case in which the JNL data 2524 can be storedimmediately after an address that is indicated by a leading head pointerthat is being used (Yes for the step S1603) as a result of the judgment,the JNL data storage address decision program 2223 decides a regionimmediately after an address that is indicated by a leading head pointeras a storage destination of the JNL data 2524 (step S1608) and updates aleading head pointer that is being used (step S1609).

On the other hand, in the case in which the JNL data 2524 cannot bestored immediately after an address that is indicated by a leading headpointer that is being used (No for the step S1603) as a result of thejudgment, the JNL data storage address decision program 2223 searches afree region in the regions after a leading head pointer (step S1604) andproceeds to the step S1605.

Moreover, in the case in which there is a free region that is equal toor larger than a predetermined size (Yes for the step S1602) as a resultof the judgment of the step S1602, the JNL data storage address decisionprogram 2223 proceeds to the step S1605.

In the step S1605, the JNL data storage address decision program 2223ensures a region of a pair of new pointers (an end pointer and a leadinghead pointer) for the control information part 220, makes the ensuredpointer to be a pointer that is being used (step S1606), and sets an endpointer in such a manner that the end pointer indicates a leading headaddress of a free region (step S1607). In the next place, a regionimmediately after an address that is indicated by an end pointer isdecided as a storage destination of the JNL data 2524 (step S1608) and aleading head pointer that is being used is updated (step S1609). Bythese steps, in the case in which there is a free region that is equalto or larger than a predetermined size in the regions before a leadinghead pointer that is being used, the JNL data 2524 can be stored intothe free region. In the present embodiment, by making a size of a freeregion to be equal to or larger than a predetermined size, the number ofpairs of pointers for managing a region that stores the JNL data 2524that has not been transmitted can be reduced. Regardless of a size of afree region, a free region can also be used in the case in which thereis a free region. In the case in which a free region cannot be found inthe step S1604, since a free region does not exist in the JVOL 252, anabnormal termination is executed.

FIG. 54 is a flowchart of a JNL read processing in accordance with theembodiment 5. The parts that are equivalent to those of the JNL readprocessing (see FIG. 25) are numerically numbered similarly and thedifferent points will be mainly described.

For the primary storage system 200A, after the JNL read program(primary) 2226 transmits the JNL (the JNCB 2523 and the JNL data 2524)that has been read to the secondary storage system 200B (step S504), andidentifies all regions in which data that has been transmitted has beenstored (step S1701). Here, the region in which data that has beentransmitted has been stored is a region that is indicated by a pair ofpointers. In the next place, one processing target is decided from atleast one identified region (step S1702).

In the next place, the JNL read program (primary) 2226 judges whether ornot all of the JNL data 2524 in a region that has been decided have beentransmitted (step S1703). Here, whether or not all of the JNL data 2524in a region have been transmitted can be judged by whether or not aregion that is indicated by a pair of pointers that are corresponded isincluded in a data region that has been identified in the step S1701.

In the case in which all of the JNL data 2524 in a region have beentransmitted (Yes for the step S1703) as a result of the judgment, theJNL read program (primary) 2226 releases a pair of pointers that arecorresponded (step S1704) and proceeds to the step S1706.

On the other hand, in the case in which all of the JNL data 2524 in aregion have not been transmitted (No for the step S1703) as a result ofthe judgment, the JNL read program (primary) 2226 sets the end pointerof a pair of pointers that are corresponded forward to a location of theJNL data 2524 that has been transmitted (step S1705) and proceeds to thestep S1706.

In the step S1706, the JNL read program (primary) 2226 judges whether ornot all regions of the JNL data 2524 that has been transmitted have beenchecked. In the case in which all regions of the JNL data 2524 that hasbeen transmitted have not been checked (No for the step S1706) as aresult of the judgment, the JNL read program (primary) 2226 proceeds tothe step S1702. On the other hand, in the case in which all regions ofthe JNL data 2524 that has been transmitted have been checked (Yes forthe step S1706) as a result of the judgment, the JNL read program(primary) 2226 terminates the processing.

For the secondary storage system 200B, in the case in which a JNL isreceived from the primary storage system 200A (step S603), the JNL readprogram (secondary) 2227 calls the JNL data storage address decisionprogram 2223 (step S1801). For the secondary storage system 200B, theJNL data storage address decision processing shown in FIG. 53 isexecuted and a block and an address of the JVOL 253 that stores the JNLdata 2524 are decided.

FIG. 55 is a flowchart of a restore processing in accordance with theembodiment 5. The parts that are equivalent to those of the restoreprocessing (see FIG. 26) are numerically numbered similarly and thedifferent points will be mainly described.

For the secondary storage system 200B, after the restore program 2228stores the maximum sequence number that has been restored as a restoredsequence number (step S706), the restore program 2228 identifies allregions in which the restored data has been transmitted (step S1901).Here, the region in which the restored data has been transmitted is aregion that is identified by a pair of pointers. In the next place, oneprocessing target region is decided from at least one identified region(step S1902).

In the next place, the restore program 2228 judges whether or not all ofthe JNL data 2524 in a region that has been decided has been restored(step S1903). Here, whether or not all of the JNL data 2524 in a regionthat has been decided has been restored can be judged by whether or nota region that is indicated by a pair of pointers that are correspondedis included in a data region that has been identified in the step S1901.

In the case in which all of the JNL data 2524 in a region has beenrestored (Yes for the step S1903) as a result of the judgment, therestore program 2228 releases a pair of pointers that are corresponded(step S1904) and proceeds to the step S1906.

On the other hand, in the case in which all of the JNL data 2524 in aregion has not been restored (No for the step S1903) as a result of thejudgment, the restore program 2228 sets the end pointer of a pair ofpointers that are corresponded forward to a location of the JNL data2524 that has been restored (step S1905) and proceeds to the step S1906.

In the step S1906, the restore program 2228 judges whether or not allregions of the JNL data 2524 that has been restored have been checked.In the case in which all regions of the JNL data 2524 that has been usedfor a restore have not been checked (No for the step S1906) as a resultof the judgment, the restore program 2228 proceeds to the step S1902. Onthe other hand, in the case in which all regions of the JNL data 2524that has been used for a restore have been checked (Yes for the stepS1906) as a result of the judgment, the restore program 2228 terminatesthe processing.

While the preferred embodiments in accordance with the present inventionhave been described above, the present invention is not restricted tothe embodiments, and the present invention can be applied to a widevariety of other modes.

For instance, the present invention is applied to a management of a JNLfor the JVOL 252 that stores a JNL on a temporary basis in the aboveembodiments. However, the present invention is not restricted to theembodiments. In the case in which the monitor data that is related to anI/O (input/output) of the computer system 10 is transmitted to anapparatus that is configured to use the monitor data for instance, thepresent invention can be applied to a management of the monitor data fora buffer region (for instance, a volume) that is used as a buffer thatstores the monitor data on a temporary basis. The point is that thepresent invention can be applied to a management of the data for aregion that is used as a buffer that stores data on a temporary basis.

REFERENCE SIGNS LIST

-   10: Computer system-   100: Host-   100A: Primary host-   100B: Secondary host-   200: Storage system-   200A: Primary storage system-   200B: Secondary storage system

1. A storage system comprising: a plurality of physical storage devices;a cache memory; a control device that is coupled to the plurality ofphysical storage devices and the cache memory; and a buffer part that isformed by using at least a part of a storage region of the plurality ofphysical storage devices and that is a storage region that is configuredto temporarily store at least one target data element that is to betransmitted to a predetermined target, wherein: (A) the control devicestores a target data element into a cache region that is a part of thecache memory and that has been allocated to a buffer region that is astorage region of a write destination of the target data element for thebuffer part; (B) the control device transmits the target data elementfrom the cache memory; and (C) in the case in which a new target dataelement is generated, the control device executes a control in such amanner that the new target data element has a high tendency to be storedfor a buffer region in which the transmitted target data element hasbeen stored and to which a cache region has been allocated.
 2. A storagesystem according to claim 1, wherein: the buffer region is divided intoa plurality of blocks; and in the case in which a new target dataelement is generated in the (C), the control device decides a secondblock as a stored destination of the new target data element when thereis not a free region in a first block of a predetermined write targetand when there is the second block that is a block prior to the firstblock and in which all target data elements have been transmitted, andthe control device decides a third block that is provided with a freeregion subsequent to the first block as a stored destination of thetarget data element when there is not the second block.
 3. A storagesystem according to claim 2, wherein: the plurality of blocks includes aplurality of blocks of a small size that is a first storage capacitysmaller than a storage capacity of the cache memory.
 4. A storage systemaccording to claim 3, wherein: the plurality of blocks includes at leastone block of a large size of a second storage capacity larger than thefirst storage capacity.
 5. A storage system according to claim 4,wherein: the block of a small size is allocated to a storage region on aleading head side of the buffer part from the block of a large size. 6.A storage system according to claim 5, wherein: in the case in which anew target data element is generated in the (C), the control devicedecides a fourth block as a stored destination of the new target dataelement when a block of a write target is the block of a large size andwhen there is the fourth block that is a block prior to the block of alarge size and in which all target data elements have been transmitted.7. A storage system according to claim 6, wherein: the buffer part is ajournal volume in which a journal is stored wherein the journal includesdata that is transmitted by a remote copy between storage systems andthat is stored into a volume of a copy source or a copy destination; andthe target data element is the data in the journal.
 8. A storage systemaccording to claim 2, wherein: in the (C), (c1) in the case in which anew target data element is generated in order of precedence, the controldevice stores the new target data element from a storage region capableof storing on a leading head of the buffer part in order of precedenceand updates the region identification information that is configured toidentify a storage region of the buffer part of at least one target dataelement that has not been transmitted to the predetermined target; (c2)the control device reads the target data element from a storage regionof a leading head of the buffer part in order of precedence, transmitsthe target data element, and updates the region identificationinformation; and (c3) in the case in which the new target data elementis generated after a storage capacity from a leading head of the bufferpart to a storage region that is identified by the region identificationinformation becomes a predetermined storage capacity, the control devicestores the new target data element that has been generated from thestorage region of a leading head of the buffer part in order ofprecedence.
 9. A storage system according to claim 2, wherein: there isa plurality of logical regions based on the physical storage device, thebuffer part is a virtual volume that is a virtual logical volume, thecontrol device is configured to allocate any one of the plurality oflogical regions to a block that is a block of a stored destination ofthe target data element and that is a block of the virtual volume, andin the (C), if there is the second block in the buffer part, a logicalregion which has been allocated to the second block is a destination ofthe target data element, in the (C), if there is not the second block inthe buffer part, a logical region which is allocated to a third block inthe buffer part is a destination of the target data element.
 10. Astorage system according to claim 1, wherein: there is a plurality oflogical regions based on the physical storage device, the buffer part isa virtual volume that is a virtual logical volume, the control deviceallocates any one of the plurality of logical regions to a virtualregion that is a region of a stored destination of the target dataelement and that is a region of the virtual volume, and in the (C), thecontrol device decides a write destination of the target data element asa virtual region in which a logical region has been allocated as long asa predetermined condition is satisfied.
 11. A data management method fora storage system that is provided with a plurality of physical storagedevices and a cache memory, comprising the steps of: storing a targetdata element into a cache region that is a part of the cache memory andthat has been allocated to a buffer region that is a storage region of awrite destination of the target data element for a buffer part that isformed by using at least a part of a storage region of the plurality ofphysical storage devices and that is a storage region that is configuredto temporarily store at least one target data element that is to betransmitted to a predetermined target; transmitting the target dataelement from the cache memory; and executing a control in such a mannerthat a new target data element has a high tendency to be stored for abuffer region in which the transmitted target data element has beenstored and to which a cache region has been allocated in the case inwhich the new target data element is generated.